package com.lightjet.macross.base.awf.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.lightjet.macross.common.core.IntKeyBaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author : lijia
 * @version : 1.0 2019-06-18 10:13
 * description : 流程配置表实体类
 */
@Entity
@Table(name="BIZ_PROCESSCONFIG")
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class BizProcessConfig extends IntKeyBaseEntity {

    public static enum ConfigTypes
    {
        ASSIGNEEAPI,//人员选择接口
        FINISHAPI,//流程完结接口
        HANDLERURL,//业务处理地址
        VIEWURL,//表单视图查看地址
    }


    public BizProcessConfig(Integer id)
    {
        super(id);
    }
    //流程定义ID 或 Key
    @ApiModelProperty(value = "流程定义ID 或 Key")
    private String procinstdefId;

    //流程几点定义ID
    @ApiModelProperty(value = "流程节点定义ID")
    String nodedefId;

    @Transient
    @ApiModelProperty(value = "流程节点定义显示名称")
    String nodedefname;

    //配置
    @ApiModelProperty(value = "配置")
    String configvalue;

    //配置类型
    @ApiModelProperty(value = "配置类型")
    ConfigTypes configtype;

    //是否启用
    @ApiModelProperty(value = "是否启用")
    @ColumnDefault("1")
    Byte isenable;


    @Transient
    @ApiModelProperty(value = "是否启用文字显示")
    String isenabledisp;

    //备注
    @ApiModelProperty(value = "备注")
    String memo;

}

